def dir_demo():
    _dir = {'张三': 23, '李四': 24, '王五': 25, '赵六': 26}
    print('_dir', _dir)
    # 23
    print('_dir.get(\'张三\')', _dir.get('张三'))
    # 23
    print('_dir[\'张三\']', _dir['张三'])
    # 遍历
    for key in _dir:
        _str = '{}:{}'.format(key, _dir[key])
        print(_str)


if __name__ == '__main__':
    dir_demo()


